﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using SSN.Objects;
using SSN.Objects.DBPersist;
using SSN.Data.Database;
using SSN.Utilities.Database;

namespace SSN.WebFramework.Logging
{
    /// <summary>
    /// Used to store information about an uncaught error in FOCALweb.
    /// </summary>
    public class ErrorReport : SafeDbObject
    {
        #region dbase stuff
        /// <summary>
        /// Name of the table the object resides in.
        /// </summary>
        public static string TableName = "fweb_errors";

        public override string DataTableName
        {
            get { return TableName; }
        }
        public static SSNDBType DatabaseType { get { return SSNDBType.BossSQL; } }
        protected override SSNDBType DataBaseType
        {
            get { return ErrorReport.DatabaseType;}
        }

        protected override bool SetKeyFields()
        {
            Context.DataKeys["id"] = -1;
            return true;
        }

        public override string ObjectName
        {
            get { return "SSN.WebFramekwork.Logging.ErrorReport"; }
        }
        #endregion
    }
}
